package com.molichuxing.gateway.bff.basic.service.impl;

import com.molichuxing.gateway.bff.basic.convertor.Convert;
import com.molichuxing.gateway.bff.basic.entity.response.VehicleMakeVo;
import com.molichuxing.gateway.bff.basic.entity.response.VehicleModlemakeVo;
import com.molichuxing.gateway.bff.basic.service.VehicleBffService;
import com.molichuxing.services.business.service.VehicleBizService;
import com.molichuxing.services.infrastructure.service.VehicleMakeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("vehicleBffService")
public class VehicleBffServiceImpl implements VehicleBffService {
	private static final Logger logger = LoggerFactory.getLogger(VehicleBffServiceImpl.class);

	@Resource
	private VehicleBizService vehicleBizService;

	@Resource
	private VehicleMakeService vehicleMakeService;

	@Override
	public List<VehicleModlemakeVo> getVehicleModlemakeBizDto() {
		return Convert.toVehicleModlemakeVo(vehicleBizService.getVehicleModlemakeBizDto());
	}

	@Override
	public List<VehicleMakeVo> getModelMakeList(Integer isMainMake) {
		return Convert.toVehicleMakeVo(vehicleMakeService.getVehicleMakeDto(isMainMake));
	}
}
